package com.vinfai.enumtest;
/**
 * http://softbeta.iteye.com/blog/1185573
 * @author vinfai
 *
 */
public enum Season {
	
	WINTER("WINTER","冬天"),SPRING("SPRING","春天"),SUMMER("SUMMER","夏天"),AUTUMN("AUTUMN","秋天");
	
	private String id ;
	private String name ;
	
	private Season(String id,String name){
		this.id = id;
		this.name = name;
	}
	
	
	public String toString(){
		return this.id+" @ "+this.name;
	}
	
	public static void main(String[] args){
		/*for(Season s : Season.values()){
			System.out.println(s);
		}*/
		Boolean.valueOf("helloword");
		doIt(Season.SPRING);
		 
	}
	
	
	private static void doIt(Season s){
		//switch 使用
		switch(s){
			case SPRING:
				System.out.println("season is :"+Season.SPRING);
				break;
			case WINTER:
				System.out.println("season is :"+Season.WINTER);
				break;
			case SUMMER:	
				System.out.println("season is :"+Season.SUMMER);
				break;
			case AUTUMN:
				System.out.println("session is "+Season.AUTUMN);
			default:
				System.out.println("default");
		}
	}
}
